﻿<phone:PhoneApplicationPage 
    x:Class="Skyper.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True"
	xmlns:vm="clr-namespace:Skyper.ViewModel"
	>
	<phone:PhoneApplicationPage.Resources>
		<vm:MainViewModel x:Key="mainModel" />
		<DataTemplate x:Key="pan" >
			<controls:PanoramaItem 
				Header="{Binding Title}" 
			/>
		</DataTemplate>
	</phone:PhoneApplicationPage.Resources>
    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
		<controls:Panorama 
			DefaultItem="{Binding Active}"
			ItemsSource="{Binding Panoramas}"
			DataContext="{StaticResource mainModel}"
		>
			<controls:Panorama.HeaderTemplate>
				<DataTemplate>
					<Button Visibility="Collapsed" />
				</DataTemplate>
			</controls:Panorama.HeaderTemplate>
			<controls:Panorama.ItemTemplate>
				<DataTemplate>
					<controls:PanoramaItem Header="{Binding Title}">
						<ContentPresenter Content="{Binding Content}" DataContext="{Binding}" />
					</controls:PanoramaItem>
				</DataTemplate>
			</controls:Panorama.ItemTemplate>
		</controls:Panorama>
    </Grid>
</phone:PhoneApplicationPage>